package config;

import navigation.*;

/**
 * Config Class for Compile-Time configurations
 *
 * @author hyurah
 */

public class Config {

	public static final int MAXFIELDS = 12+2;
	public static final int MINFIELDS = 10+2;
	public static final boolean STARTATNARROWSIDE = true;
	public static final boolean FIRSTCURVEPOINTSTOMAZE = true;
	public static final boolean GORIGHT = true;

	/**
	 * Get a less map-dependent navigator
	 *
	 * @return navigator that navigates to the red point
	 */

	public static Navigator getSafeNavigator() {
		return new GoRightNavigator();
	}

	/**
	 * Get a less map-dependent navigator
	 *
	 * @param oldNavigator old navigator for data retrievel
	 * @return navigator that navigates to the red point
	 */

	public static Navigator getSafeNavigator(Navigator oldNavigator) {
		return new GoRightNavigator(oldNavigator);
	}

	/**
	 * Get a less map-dependent exit-navigator
	 *
	 * @param oldNavigator old navigator for data retrievel
	 * @return navigator that navigates to an exit
	 */

	public static Navigator getSafeExitNavigator(Navigator oldNavigator) {
		return new GoRightExitNavigator(oldNavigator);
	}

	/**
	 * Get a navigator that searches for the red point
	 *
	 * @return navigator that navigates to the red point
	 */

	public static Navigator getSearchRedPointNavigator() {
		return new GoToUnknownFieldNavigator();
	}

	/**
	 * Get a navigator that searches for the red point
	 *
	 * @param oldNavigator old navigator for data retrievel
	 * @return navigator that navigates to the red point
	 */

	public static Navigator getSearchRedPointNavigator(Navigator oldNavigator) {
		return new GoToUnknownFieldNavigator(oldNavigator);
	}

	/**
	 * Get a navigator that goes the shortest known path to the red point
	 *
	 * @param oldNavigator old navigator for data retrievel
	 * @return navigator that navigates to the red point
	 */

	public static Navigator getGoToRedPointNavigator(Navigator oldNavigator) {
		return new GoShortestKnownPathNavigator(SearchTarget.REDPOINT, oldNavigator);
	}

	/**
	 * Get a navigator that goes the shortest known path to an exit
	 *
	 * @param oldNavigator old navigator for data retrievel
	 * @return navigator that navigates to an exit
	 */

	public static Navigator getGoToExitNavigator(Navigator oldNavigator) {
		return new GoShortestKnownPathNavigator(SearchTarget.EXIT, oldNavigator);
	}

	public static Navigator getGoToStartNavigator(Navigator oldNavigator) {
		return new GoShortestKnownPathNavigator(SearchTarget.START, oldNavigator);
	}

	public static Navigator getGoToRedHardcodedNavigator() {
		return new GoToRedHardcodedNavigator();
	}

	public static Navigator getGoToExitHardcodedNavigator() {
		return new GoToExitHardcodedNavigator();
	}

}
